#ifndef _PLAYER_H_
#define _PLAYER_H_

#include "EventProcessor.h"
#include "EventProcessorImp.h"
#include "Message.h"

using namespace std;

class PlayerImp : public EventProcessorImp {
	private:

		DistributedCounter &dCounter;

		EventProcessor Master;
	
		int choice; // 0 - rock, 1 - paper, 2 - scissors	

	public:
		PlayerImp(EventProcessor& _master, DistributedCounter& _dCounter);  
	
		MESSAGE_HANDLER_DECLARATION(Rematch);

		MESSAGE_HANDLER_DECLARATION(Die);

		void SendChoice();	
};

// Interface class
class Player : public EventProcessor {
 public:
  Player(EventProcessor& _controller, DistributedCounter& _dCounter);
};

inline Player::Player(EventProcessor& _controller, DistributedCounter& _dCounter){
  evProc = new PlayerImp(_controller,_dCounter);
}

#endif 
